<?php

namespace app\admin\controller\mall;

use app\admin\traits\Curd;
use app\common\controller\AdminController;
use app\common\model\MallSpecs;
use EasyAdmin\annotation\ControllerAnnotation;
use EasyAdmin\annotation\NodeAnotation;
use think\App;
/**
 * Class SpecsValue
 * @package app\admin\controller\mall
 * @ControllerAnnotation(title="规格管理")
 */
class Specs extends AdminController
{
    use Curd;
    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->model =(new MallSpecs());
        $this->assign('getStatusList', $this->model->getStatusList());
    }
    /**
     * @NodeAnotation(title="规格列表")
     */
    public function getSpecsList()
    {
        $lists = $this->model
            ->field('id,title')
            ->where('status', 1)
            ->select()
            ->toArray();
        $this->success('ok', $lists);
    }
}